<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>
<button>获取数据</button>
</body>
<script>
	const btn = document.querySelector("button");

	btn.onclick = function(){
		const fnName = "JQuery"+Math.random().toString(36).slice(2);
		window[fnName] = function(data){
			console.log(data);
			delete window[fnName];
		}
		const script = document.createElement("script");
		script.src = "https://fts.jd.com/area/get?fid=72&callback="+fnName;
		script.onload = function(){
			document.body.removeChild(script);
		}
		document.body.appendChild(script);
	}
</script>
</html>